import request from '@/utils/request'

// 查询调拨单列表
export function listTransfer(query) {
  return request({
    url: '/wms/transfer/list',
    method: 'get',
    params: query
  })
}

// 查询调拨单详细
export function getTransfer(tranUuid) {
  return request({
    url: '/wms/transfer/' + tranUuid,
    method: 'get'
  })
}

// 更新库存
export function updInventory(tranUuid) {
  return request({
    url: '/wms/transfer/upd-inventory/' + tranUuid,
    method: 'get'
  })
}

// 新增调拨单
export function addTransfer(data) {
  return request({
    url: '/wms/transfer',
    method: 'post',
    data: data
  })
}

// 修改调拨单
export function updateTransfer(data) {
  return request({
    url: '/wms/transfer',
    method: 'put',
    data: data
  })
}

// 删除调拨单
export function delTransfer(tranUuid) {
  return request({
    url: '/wms/transfer/' + tranUuid,
    method: 'delete'
  })
}
